<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Models\Renting;
use Illuminate\Http\Request;

class UserController extends Controller
{
    public function userinfo(Request $request){
        $openid = $request->get('openid');
        $data = $request->except('openid');
        Renting::where('openid',$openid)->update($data);
        return ['status'=>0,'msg'=>'修改成功'];
    }
    public function getuserinfo(Request $request){
        $openid = $request->get('openid');
        return Renting::where('openid',$openid)->first();
    }
}
